package com.lk.mi.service.impl;

import com.lk.mi.entity.item;
import com.lk.mi.mapper.itemMapper;
import com.lk.mi.service.itemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class itemServiceImpl implements itemService {

    @Autowired
    private itemMapper itemMapper;

    @Override
    public List<item> findAll() {
        List<item> list = itemMapper.findAll();
        return list;
    }

    @Override
    public item findById(Integer id) {
        item item = itemMapper.findById(id);
        return item;
    }

    @Override
    public Integer update(item item) {
        Integer row = itemMapper.update(item);
        return row;
    }

    @Override
    public Integer delete(Integer id) {
        Integer row = itemMapper.delete(id);
        return row;
    }

    @Override
    public Integer add(item item) {
        Integer row = itemMapper.add(item);
        return row;
    }
}
